﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zocono.WCS.Domain.PlcBytesObject
{
    public class PlanarGeneralWriteWcsHynnStateAction : WriteByteObjectBase
    {
        public PlanarGeneralWriteWcsHynnStateAction()
        {
        }

        public PlanarGeneralWriteWcsHynnStateAction(long plcConnectionID
            , long plcWriteDbID
            , int dbCode
            , int dbStart
            , string objectType
            , byte alrmCode)
        {
            PlcConnectionID = plcConnectionID;
            PlcWriteDbID = plcWriteDbID;
            DbCode = dbCode;
            DbStart = dbStart;
            ObjectType = objectType;
            AlrmCode = alrmCode;
        }
        public byte AlrmCode { get; set; }


        public override byte[] Deserialize()
        {
            byte[] bytes = new byte[1];

            HelperByte.SetByteAt(bytes, 0, AlrmCode);

            return bytes;
        }
    }
}
